<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
	  xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout"
	  layout:decorate="layout">
	<!--<head  th:include="theme/fragments::header">-->
	<head th:include="include/common::common"></head>
	<!-- 在 <head th:include=""></head> 标签中将不能引入 -->
	<link th:href="@{res/plugins/datepicker/datepicker3.css}" rel="stylesheet" type="text/css" />
	<link th:href="@{res/plugins/validator/bootstrapValidator.min.css}" rel="stylesheet" type="text/css" />
	<link th:href="@{css/diary/diary.css}" rel="stylesheet" type="text/css"/>
	<link href="atom.xml" rel="stylesheet" type="application/atom+xml" title="Atom" >

	<!-- skin-blue 为 AdminLTE 的主题颜色 可选颜色主题：/res/dist/css/skins-->
	 <body class="hold-transition skin-blue sidebar-mini">
	<!--<body class="hold-transition skin-green-light sidebar-mini">-->
		<div class="wrapper">
			<!--header-->
			<div th:include="include/header"></div>
			<!--menu-->
			<aside th:include="include/menu"/>
			<!-- Left side column. contains the logo and sidebar -->
			<!-- Content Wrapper. Contains page content -->
			<div class="content-wrapper">
				<!-- Content Header (Page header) -->
				<section class="content-header">
					<!-- 路径导航 -->
					<a th:href="@{/home}"><i class="fa fa-home"></i> 主页</a> >
					<a th:href="@{/diary}">日记管理</a>&nbsp;&nbsp;<small>日记列表</small>
				</section>
				<!-- Main content -->
				<section class="content">
					<!-- 查询、添加、批量删除、导出、刷新 -->
					<div class="row-fluid">
						<div class="pull-right">
							<div class="btn-group">
								<button type="button" class="btn btn-primary btn-sm"  id="btn-add">
									<i class="fa fa-plus"></i> 添加
								</button>
								<button type="button" class="btn btn-primary btn-sm" id="btn-re">
									<i class="fa fa-refresh"></i> 刷新
								</button>
							</div>
						</div>
						<div class="pull-left">
							<form id="queryForm" class="form-inline" method="post">
								<div class="form-group" id="dateDiv">
									<input type="text" class="form-control date-picker input-sm" id="dateTimeRange" value="" placeholder="选择时间"/>
									<input type="hidden" name="startTime" id="startTime" value="" /> 
									<input type="hidden" name="endTime" id="endTime" value="" />
								</div>
								<!-- <a id="clearDate">清除</a> -->
								<div class="form-group">
									<select class="form-control input-sm" name="moodId" id="sel1">
										<option disabled selected>请选择心情</option>
									</select>
								</div>
								<button type="button" class="btn btn-primary btn-sm" id="btn-query">
									<i class="fa fa-search"></i> 查询
								</button>
							</form>
						</div>
					</div>
					<div class="row">
						<div class="col-xs-12">
							<div class="box">
								<div class="box-body">
									<table id="dataTable" class="table table-striped table-bordered table-hover table-condensed" align="center">
										<thead>
											<tr class="info">
												<!-- <td><input type="checkbox" id="checkAll"></td> -->
												<th>序号</th>
												<th>用户名</th>
												<th>日期</th>
												<th>地点</th>
												<th>情绪</th>
												<th>关键字</th>
												<th>备注</th>
												<th>状态</th>
												<th>创建时间</th>
												<th>修改时间</th>
												<th>操作</th>
											</tr>
										</thead>
									</table>
								</div>
								<!-- /.box-body -->
							</div>
							<!-- /.box -->
						</div>
						<!-- /.col -->
					</div>
					<!-- /.row -->
				</section>
			</div>
			<!--footer-->
			<div th:include="include/footer"></div>
			<div class="control-sidebar-bg"></div>
		</div>
		
		<!-- 独立窗口，点击触发 -->
		<!-- 添加、修改窗口 -->
		<div class="row">
			<div class="window col-xs-12">
				<div class="modal fade" id="editModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
					<div class="modal-dialog">
						<form id="hiddenForm">
							<input type="hidden" name="id">
							<input type="hidden" name="writeDate">
							<input type="hidden" name="moodId">
							<input type="hidden" name="keyword">
							<input type="hidden" name="site">
							<input type="hidden" name="remark">
							<input type="hidden" name="content">
							<input type="hidden" name="isLock">
							<input type="hidden" name="score" value="1">
						</form>
						<!-- autocomplete="off" 禁止 input 缓存 -->
						<form class="form-horizontal" id="editForm" action="" method="post" autocomplete="off">
							<div class="modal-content">
								<div class="modal-header bg-blue" style="background-color: #307095;">
									<button type="button" class="close" data-dismiss="modal">
										<span aria-hidden="true">&times;</span><span class="sr-only"><sp:message code="sys.close" /></span>
									</button>
									<h4 class="modal-title cyrillic-ext" id="myModalLabel">日志管理-编辑</h4>
								</div>

								<div class="modal-body">
									<input type="hidden" name="id">
									<div class="form-group">
										<label for="inputName" class="col-xs-1 control-label">日期</label>
										<div class="col-xs-11">
											<input type="text" class="form-control form_datetime" placeholder="输入日期" name="writeDate" id="writeDate" readonly>
										</div>
									</div>
									<div class="form-group">
										<label for="inputName" class="col-xs-1 control-label">心情</label>
										<div class="col-xs-11">
											<select  class="form-control" name="moodId" id="sel2">
												<option disabled selected value="0">请选择心情</option>
											</select>
										</div>
									</div>
									<div class="form-group">
										<label for="inputName" class="col-xs-1 control-label">关键字</label>
										<div class="col-xs-11">
											<input type="text" class="form-control" placeholder="输入关键字" name="keyword">
										</div>
									</div>
									<div class="form-group">
										<a id="setSite" href="javascript:void(0)" style="cursor:hand;">
											<label for="inputName" class="col-xs-1 control-label" data-toggle='tooltip' data-placement='right' title="点击获取当前位置，支持 IE/Edge，Chrome 需能访问 Google">地点</label>
										</a>
										<div class="col-xs-11">
											<input type="text" class="form-control" placeholder="输入地点" name="site">
										</div>
									</div>
									<div class="form-group">
										<label for="inputName" class="col-xs-1 control-label">备注</label>
										<div class="col-xs-11">
											<input type="text" class="form-control" placeholder="输入备注" name="remark">
										</div>
									</div>
									<div class="form-group">
										<label for="inputName" class="col-xs-1 control-label">等级</label>
										<div class="col-xs-11" id="star">

										</div>
									</div>
									<div class="form-group" id="lock">
										<label for="inputName" class="col-xs-1 control-label">类型</label>
										<div class="col-xs-3">
											<label class="checkbox-inline">
												<!-- <input type="radio" name="status" id="status" value="0" checked> 普通 -->
											</label>
											<label class="checkbox-inline">
												<!-- <input type="radio" name="status" id="status2" value="2"> 锁定 -->
											</label>
										</div>
										<div id="pwd">
											<!-- <input type="text" class="form-control" placeholder="输入密码" name="pwd"> -->
										</div>
									</div>
									<div class="form-group">
										<label for="inputName" class="col-xs-1 control-label">内容</label>
										<div class="col-xs-11">
											<textarea style="width:828px;height:400px;visibility:hidden;" id="content" name="content" data-bv-notempty data-bv-notempty="not empt"></textarea>
										</div>
									</div>
								</div>
								<!-- modal-body END -->
								<div class="modal-footer">
									<button type="submit" name="submit" id="btn-submit" class="btn btn-primary">提交</button>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
		<!-- 展示日记内容窗口 -->
		<div class="window row">
			<div class="modal fade col-xs-12" id="contentModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
				<div class="modal-dialog">
					<div class="modal-content">
						<div class="modal-header bg-blue" style="background-color: #307095;">
							<button type="button" class="close" data-dismiss="modal">
								<span aria-hidden="true">&times;</span><span class="sr-only"><sp:message code="sys.close" /></span>
							</button>
							<h4 class="modal-title" id="myModalLabel"></h4>
						</div>
						<div class="modal-body" >
							<table border="0" width=100% id="showContentTab">
								<!-- <tr>
									<td id="showContent"></td>
								</tr> -->
							</table>
						</div>
						<!-- modal-body END -->
					</div>
				</div>
			</div>
		</div>
		<!-- 锁定窗口  -->
		<div class="modal fade" id="lockModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header" style="background-color: #307095;">
						<button type="button" class="close" data-dismiss="modal">
							<span aria-hidden="true">&times;</span><span class="sr-only"><sp:message code="sys.close" /></span>
						</button>
						<h4 class="modal-title" id="myModalLabel">提示信息</h4>
					</div>
					<div class="modal-body" >
						<div class="form-group">
							<p class="text-danger"><span><strong>此日记已锁定，请输入口令再进行操作</strong></span></p>
							<div>
								<input type="password" class="form-control" placeholder="口令" name="pwd">
							</div>
						</div>
					</div>
					<div class="modal-footer">
						<button type="submit" name="lockSubmit" id="btn-submit" class="btn btn-primary">提交</button>
					</div>
				</div>
			</div>
		</div>

		<script>
			$(function () {

            })
		</script>
		<script th:src="@{res/dist/js/app.min.js}" type="text/javascript"></script>
		<script th:src="@{res/laydate/laydate.js}" type="text/javascript"></script>
		<script th:src="@{res/plugins/datepicker/bootstrap-datepicker.js}" type="text/javascript"></script>
		<script th:src="@{res/plugins/datepicker/bootstrap-datetimepicker.zh-CN.js}" type="text/javascript"></script>
		<script th:src="@{res/plugins/validator/bootstrapValidator.min.js}" type="text/javascript"></script>
		<script th:src="@{js/diary/editFormValidate.js}" type="text/javascript"></script>
		<script th:src="@{js/diary/diary.js}" type="text/javascript"></script>
		<script th:src="@{js/diary/lock.js}" type="text/javascript"></script>
		<script th:src="@{res/laydate/laydate.js}" type="text/javascript"></script>
		<script th:src="@{js/site.js}" type="text/javascript"></script>
		<script th:src="@{js/base64.js}" type="text/javascript"></script>
		<script th:src="@{res/kindeditor-4.1.4/kindeditor-all-min.js}" type="text/javascript"></script>
		<script th:src="@{res/kindeditor-4.1.4/lang/zh_CN.js}" type="text/javascript"></script>
		<script th:src="@{res/plugins/raty-2.5.2/jquery.raty.min.js}" type="text/javascript"></script>
	</body>
</html>
